-
-
Notifications
You must be signed in to change notification settings - Fork 910
[client] Add bind activity listener to bypass udp sockets #4646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a bind activity listener to bypass UDP sockets and fix incompatibility issues between lazy connections and IP_UNICAST_IF socket options on Windows. The change introduces support for both UDP-based and bind-based activity detection depending on the WireGuard interface mode.
Key changes:
- Adds support for bind-based activity listeners using LazyConn for userspace bind mode
- Refactors existing UDP listener code into separate files for better organization
- Updates interfaces to expose bind providers and WireGuard address information
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| client/internal/lazyconn/wgiface.go | Adds Address() method to WGIface interface |
| client/internal/lazyconn/activity/manager.go | Refactors to support both UDP and bind listeners with factory method |
| client/internal/lazyconn/activity/listener_udp.go | Extracted UDP listener implementation from original listener.go |
| client/internal/lazyconn/activity/listener_bind.go | New bind listener implementation using LazyConn for userspace mode |
| client/internal/lazyconn/activity/listener.go | Simplified to factory function and interface definition |
| client/internal/lazyconn/activity/lazy_conn.go | New LazyConn implementation for activity detection in bind mode |
| client/iface/*.go | Adds GetICEBind() method to device interfaces across platforms |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
3fa39e6 to
a991b19
Compare
a991b19 to
5923cbe
Compare
|
* upstream/main: (135 commits) [signal] Fix HTTP/WebSocket proxy not using custom certificates (netbirdio#4644) [client] Fix active profile name in debug bundle (netbirdio#4689) [management] Add peer disapproval reason (netbirdio#4468) [misc] Update tag name extraction in install.sh (netbirdio#4677) [client] Clean up match domain reg entries between config changes (netbirdio#4676) [client] Delete TURNConfig section from script (netbirdio#4639) [client] Security upgrade alpine from 3.22.0 to 3.22.2 netbirdio#4618 [client] Fix status showing P2P without connection (netbirdio#4661) [client] Support BROWSER env for login (netbirdio#4654) [client] Remove rule squashing (netbirdio#4653) Handle the case when the service has already been down and the status recorder is not available (netbirdio#4652) [client] Set default wg port for new profiles (netbirdio#4651) [client] Add bind activity listener to bypass udp sockets (netbirdio#4646) [client] Fix missing flag values in profiles (netbirdio#4650) [management] feat: Basic PocketID IDP integration (netbirdio#4529) [client] Force TLS1.2 for RDP with Win11/Server2025 for CredSSP compatibility (netbirdio#4617) [misc] Add service definition for netbird-signal (netbirdio#4620) [management] pass temporary flag to validator (netbirdio#4599) [client] Explicitly disable DNSOverTLS for systemd-resolved (netbirdio#4579) [management] sync all other peers on peer add/remove (netbirdio#4614) ...



Describe your changes
This fixes an incompatibility between lazy connections and
IP_UNICAST_IFsock opts on windows.Issue ticket number and link
Stack
Checklist
Documentation
Select exactly one:
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__